import 'package:flutter/material.dart';

class ZFTextButton extends StatelessWidget {
  final String data;
  final bool highlight;
  final bool bottomLineVisible;
  final void Function()? onTap;
  const ZFTextButton(this.data, {Key? key, this.onTap, this.highlight = false, this.bottomLineVisible = true})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: onTap,
      child: Text(
        data,
        style: TextStyle(
            color: highlight ? Theme.of(context).colorScheme.secondary : Colors.white,
            fontSize: 18,
            fontWeight: FontWeight.w500,
            decoration:
                highlight && bottomLineVisible ? TextDecoration.underline : TextDecoration.none),
      ),
    );
  }
}
